In my project I have a Multi Form that I use to upload pictures. However, there needs to be a restriction to the amount of pictures a user can add. This amount needs to be min. 1 and max. 10. Now when pressing the 'submit' button, an OK flow goes to a Scrip Unit with as input the Pictures object. Inside the Script Unit I have the following piece of code:
#input Object[] pictures
if((pictures.length == 0) || (pictures.length > 10)){
return ["resultCode":"error"]
} else {
return ["resultCode":"success"]
}
However, this is not working since it always returns 'success'.
Hope someone can help me out here.